﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<DIS_WEB_Client.ViewModels.GroupViewModel>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="MainContent2" runat="server">
    <% 
        var oUser = Model.UsersModel.GetModel.LstObjModel[0];
    %>
    <script type="text/javascript">
        function ValidateCheckout() {
            var total = <%= Model.ShoppingCartModel.CartTotal %>;
            if (total == 0) {
                alert("There is no any items in shopping cart to checkout");
                return false;
            }
            return true;
        }
    </script>
    <table width="560" border="0" cellspacing="0" cellpadding="0">
    <tbody>
        <tr>
        <td valign="top">
        <!-- MAIN -->

            <div class="page_title" style="width: 556px">
                <div class="text">
                    Approve Order
                </div>
            </div>
            <br />
            <% using (Html.BeginForm("AddOrder", "Home", FormMethod.Post, new { onsubmit = "return ValidateCheckout();" }))
               { %>
			<table width="100%" border="0" cellpadding="0" cellspacing="0" style="text-align:left">
			    <tbody>
			        <tr bgcolor="#f6fbfd">
				        <td valign="top"><div style="margin: 5px 10px;"><b>Full Name</b></div></td>
				        <td valign="top">
                            <div style="margin: 5px 10px 5px 5px;">
                                <%= oUser.Name %>
                            </div>
                        </td>
			        </tr>
			        <tr>
				        <td valign="top"><div style="margin: 5px 10px;"><b>Phone</b></div></td>
				        <td valign="top">
                            <div style="margin: 5px 10px 5px 5px;">
                                <%= oUser.Phone %>
                            </div>
                        </td>
			        </tr>
			        <tr bgcolor="#f6fbfd">
				        <td valign="top"><div style="margin: 5px 5px 5px 10px;"><b>Address</b></div></td>
				        <td valign="top">
                            <div style="margin: 5px 10px 5px 5px;">
                                <%= oUser.Address %>
                            </div>
                        </td>
			        </tr>
			        <tr>
				        <td valign="top"><div style="margin: 5px 5px 5px 10px;"><b>Email</b></div></td>
				        <td valign="top">
                            <div style="margin: 5px 10px 5px 5px;">
                                <%= oUser.Email %>
                            </div>
                        </td>
			        </tr> 
                    <tr>
				        <td valign="top"><div style="margin: 5px 5px 5px 10px;"><b>Pay with</b></div></td>
				        <td valign="top">
                            <div style="margin: 5px 10px 5px 5px;">
                                <%= Model.ShoppingCartModel.CartTotal %> USD
                            </div>
                        </td>
			        </tr> 
                    <tr>
						<td height="20" style="width: 130px">
						</td>
						<td height="20">
							<div style="margin: 5px 10px 5px 5px;">
								<br/>
                                <input type="hidden" name="Order_IDUsers" value="<%= oUser.ID.ToString() %>" />
                                <input type="submit" name="sbt" id="sbt" value="I confirm my order" style="background-image: url(../../../Content/Images/bgbutton.jpg); color: #FFFFFF; font-size: 16px; font-weight: bold; border: 1px #DBDBDB solid; height: 30px; cursor:pointer;" />
								<p>
								</p>
							</div>
						</td>
					</tr>

                </tbody>
			    <!-- MAIN END -->
            </table>
        <% } %>
	</td></tr>
	</tbody>
</table>
</asp:Content>
